home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
Projects
/
Examples
/
Demos
/
Lorenz Data
< prev
next >
Wrap
Lisp/Scheme
|
1998-10-26
|
1KB
|
62 lines
; by Nigel Morgan
; to analyze the score double-click high-lighted keywords
(gen-lorenz xmat ymat zmat 100 0.02 0.7 0.7 0.7) ; symbol melodies
(gen-lorenz xton yton zton 10) ; tonalities
(setq mel1 (vector-to-symbol a l xmat))
(setq mel2 (vector-to-symbol a l ymat))
(setq mel3 (vector-to-symbol a l zmat))
(setq rhy1 (vector-to-list (length-quantize 1/32 -1/16 1/4 xmat))))
(setq rhy2 (vector-to-list (length-quantize 1/16 -1/16 1/4 ymat)))
(setq rhy3 (vector-to-list (length-quantize 1/16 -1/16 1/4 zmat)))
(create-tonality scale1 (vector-to-list (vector-round 1 12 xton)))
(create-tonality scale2 (vector-to-list (vector-round 1 12 yton)))
(create-tonality scale3 (vector-to-list (vector-round 1 12 zton)))
(def-symbol
part1 mel1
part2 mel2
part3 mel3
)
(def-length
part1 rhy1
part2 rhy2
part3 rhy3
)
(def-velocity
part1 (symbol-to-velocity 120 32 7 mel1)
part2 (symbol-to-velocity 120 32 7 mel2)
part3 (symbol-to-velocity 120 32 7 mel3)
)
(def-tonality
part1 (activate-tonality (scale1 c 5))
part2 (activate-tonality (scale2 c 4))
part3 (activate-tonality (scale3 c 3))
)
(def-zone
part1 (make-zone rhy1)
part2 (make-zone rhy2)
part3 (make-zone rhy3)
)
(def-channel
part1 1
part2 2
part3 3
)
(midiport :printer)
(compile-instrument-p "ccl;output:" "lorenz midi"
part1
part2
part3
)